/*
Example 5.3
Control a toy remote control car with arduino
Chapter Five @ http://www.tronixstuff.com/tutorials
*/

int forward = 12;
int reverse = 11;
int left = 9;
int right = 7;
int del = 5000;


void setup()
{
    pinMode(forward, OUTPUT);
    pinMode(reverse, OUTPUT);
    pinMode(left, OUTPUT);
    pinMode(right, OUTPUT);
}

void loop()
{
  digitalWrite(right, HIGH);
  delay(1000);
  digitalWrite(right, LOW);
  delay(1000);
  
    digitalWrite(left, HIGH);
  delay(1000);
  digitalWrite(left, LOW);
  delay(1000);

  digitalWrite(forward, HIGH);
  delay(del);
  digitalWrite(forward, LOW);
  delay(1000);

}
